GtkStyle: Protect against padding being NULL
authorCarlos Garnacho <carlosg@gnome.org>
Sat, 11 Sep 2010 10:10:50 +0000 (12:10 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Sat, 4 Dec 2010 14:38:13 +0000 (15:38 +0100)
gtk/gtkstyle.c

index 310da02ff4dc4bf87793b03788e8a9260568858a..8f495a795dd288c4c889e67d00a97060263fe325 100644 (file)
@@ -705,10 +705,13 @@ gtk_style_update_from_context (GtkStyle *style)
                          "padding", &padding,
                          NULL);
 
-  style->xthickness = padding->left;
-  style->ythickness = padding->top;
+  if (padding)
+    {
+      style->xthickness = padding->left;
+      style->ythickness = padding->top;
 
-  gtk_border_free (padding);
+      gtk_border_free (padding);
+    }
 }
 
 static void